AC_PREREQ(2.61)
AC_INIT(inthemood, 0.1, c.f.curtis@gmail.com)
AM_INIT_AUTOMAKE(inthemood, 0.1)
AC_CONFIG_SRCDIR(src/fextract.cpp)
AM_PATH_PYTHON(2.5)

# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PATH_PROG(PYTHON, python)

# Checks for libraries.
AC_CHECK_LIB(asound, main)
AC_CHECK_LIB(mad, main,,AC_MSG_WARN("Can't find libmad, mp3 support disabled"))
AC_CHECK_LIB(marsyas, main)
AC_CHECK_LIB(vorbis, vorbis_info_init,,AC_MSG_WARN("Can't find libvorbis, ogg support disabled"))
AC_CHECK_LIB(vorbisfile, ov_clear,,AC_MSG_WARN("Can't find libvorbis, ogg support disabled"))

# Checks for header files.
AC_HEADER_DIRENT
AC_LANG_SAVE
AC_LANG_CPLUSPLUS

AC_CHECK_HEADERS([vector iostream fstream string],,AC_MSG_ERROR("Cannot find libstdc++ headers"))

# Check for Marsyas headers (for some reason only NumericLib.h can be found)
AC_CHECK_HEADERS([marsyas/NumericLib.h])#,,AC_MSG_ERROR("Cannot find Marsyas headers"))

AC_LANG_RESTORE
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST

# Checks for library functions.

AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
